PROJECT(InverseKinematicsPlugin)

SET(InverseKinematicsPlugin_SRCS
	InverseKinematicsPlugin.cc
)

SET(InverseKinematicsPlugin_MOC_HDRS
	InverseKinematicsPlugin.h
	include/toolkit_interfaces.h
)

SET(CMAKE_AUTOMOC ON)

INCLUDE_DIRECTORIES (${QT_INCLUDE_DIR})
INCLUDE_DIRECTORIES (${CMAKE_SOURCE_DIR}/include)
INCLUDE_DIRECTORIES (${CMAKE_CURRENT_SOURCE_DIR})
INCLUDE_DIRECTORIES (${CMAKE_CURRENT_SOURCE_DIR}/include)
INCLUDE_DIRECTORIES (${RBDL_INCLUDE_DIR})
INCLUDE_DIRECTORIES (${EIGEN3_INCLUDE_DIR})
INCLUDE_DIRECTORIES (${BOOST_INCLUDE_DIR})
INCLUDE_DIRECTORIES (${CMAKE_SOURCE_DIR}/plugins/MotionMarkerPlugin)
INCLUDE_DIRECTORIES (${CMAKE_SOURCE_DIR}/plugins/AnimationPlugin)

ADD_DEFINITIONS (${QT_DEFINITIONS})
ADD_DEFINITIONS (-DQT_PLUGIN)
ADD_DEFINITIONS (-DQT_SHARED)
#ADD_DEFINITIONS(-DQT_NO_DEBUG)

SET(CMAKE_POSITION_INDEPENDENT_CODE ON)

ADD_LIBRARY (IKplugin SHARED ${InverseKinematicsPlugin_SRCS})

TARGET_LINK_LIBRARIES (IKplugin
	${QT_LIBRARIES}
	${QT_QTXML_LIBRARY}
	Qt5::Core
	Qt5::Gui
	Qt5::Widgets
	Qt5::3DCore
	Qt5::3DExtras
	Qt5::3DRender
	Qt5::3DInput
	${RBDL_LIBRARY}
	toolkitlib
	animationplugin
)

INSTALL( TARGETS IKplugin LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR})
